package reflect;

import java.util.Arrays;

public class ArgDemo {
    public static void main(String[] args) {
        dosome(1,"one");
        dosome(2,"one","two");
        dosome(1,"one","two","three");


    }

    /**
     * 一个方法里只能由一个变长参数，且必须是最后一个参数
     * @param a
     * @param arg
     */
    public static void dosome(int a,String... arg){
        System.out.println(arg.length);
        System.out.println(Arrays.toString(arg));
    }

}
